<template>
	<view class="col">
		<navigator :url="`./detail?id=${item.courseId}`">
			<view class="item">
				<image :src="item.appCourseCustomVo.imageUrl" mode=""></image>
				<view class="bottom">
					<view class="ovh title">
						{{item.appCourseCustomVo.name}}
					</view>
					<view class="right">
						<view class="progress">
							<text :style="`width:${progress}`"></text>
						</view>
						已学{{progress}}
					</view>
				</view>
			</view>
		</navigator>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				progress: "35%"
			}
		},
		props: {
			item: {
				default: {}
			}
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	.col {
		padding: 10rpx 40rpx;

		.item {
			padding: 35rpx 20rpx;
			display: flex;
			box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.05);
			background-color: #fff;
			border-radius: 10rpx;

			.left {
				display: flex;
				align-items: center;
			}

			image {
				width: 200rpx;
				height: 130rpx;
			}
		}

		.bottom {
			width: calc(100% - 200rpx);
			padding-left: 20rpx;
			display: flex;
			flex-direction: column;
			justify-content: space-between;

			.title {
				font-weight: bold;
			}

			.right {
				color: #999;
				font-size: 24rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;

				.progress {
					width: 250rpx;
					height: 16rpx;
					background-color: #f0f0f0;
					border-radius: 100px;
					position: relative;

					text {
						display: block;
						position: absolute;
						left: 0;
						height: 100%;
						background: linear-gradient(79.76deg, rgba(112, 232, 139, 1) 14.15%, rgba(81, 199, 108, 1) 101.78%);
						border-radius: 100px;
					}
				}
			}
		}
	}
</style>